import { StyleSheet, Text, View, TextInput,Image,Button } from 'react-native'
import React, { useState } from 'react'

export default function Changepassword() {
  const [password, setPassword] = useState('');
  const [password1, setPassword1] = useState('');
  const [password2, setPassword2] = useState('');


  return (
    <View style={{padding: 30}}>
      <View style={styles.container}>
        <Text>
          <Image
            source={require('../../assets/images/Suoding.png')}
            style={{ width: 30, height: 30, marginRight: 0 }}
          ></Image>
        </Text>
        <TextInput
          style={styles.input}
          placeholder="请输入旧密码"
          secureTextEntry={true}
          onChangeText={setPassword}
          value={password}
        />
      </View>
      <View style={styles.container1}>
        <Text>
          <Image
            source={require('../../assets/images/Suoding.png')}
            style={{ width: 30, height: 30, marginRight: 0 }}
          ></Image>
        </Text>
        <TextInput
          style={styles.input}
          placeholder="请设置6-20位新的登录密码"
          secureTextEntry={true}
          onChangeText={setPassword1}
          value={password1}
        />
      </View>
      <View style={styles.container1}>
        <Text>
          <Image
            source={require('../../assets/images/Suoding.png')}
            style={{ width: 30, height: 30, marginRight: 0 }}
          ></Image>
        </Text>
        <TextInput
          style={styles.input}
          placeholder="请再次输入新的登录密码"
          secureTextEntry={true}
          onChangeText={setPassword2}
          value={password2}
        />
      </View>
      <Button
        title="提交"
      ></Button>

    </View>
  )
}

const styles = StyleSheet.create({
  container: {
    width: '90%',
    padding: 20,
    flexDirection: "row",
    alignItems: 'center',
    justifyContent: 'space-between',
  
  },
  container1: {
    width: '90%',
    padding: 20,
    flexDirection: "row",
    alignItems: 'center',
    justifyContent: 'space-between',
    marginTop: -30,

  },
  input: {
    height: 40,
    borderColor: 'gray',
    borderWidth: 1,
    marginBottom: 10,
    paddingHorizontal: 10,
    borderRadius: 5,
    width: '100%',
  },
  passwordText: {
    marginTop: 20,
    fontSize: 16,
  },
})